{% extends "base_generic.html" %}

{% block content %}

<h1>Delete Book</h1>

{% if book.bookinstance_set.all %}
<p>You can't delete this book until all copies have been deleted:</p>

<ul>
{% for copy in book.bookinstance_set.all %}
  <li><a href="{{ copy.get_absolute_url }}">{{copy.id}}</a> (Imprint: {{copy.imprint}})</li>
{% endfor %}
</ul>

{% else %}
<p>Are you sure you want to delete the book: {{ book }}?</p>

<form action="" method="POST">
  {% csrf_token %}
  <input type="submit" action="" value="Yes, delete.">
</form>
{% endif %}

{% endblock %}
